package com.lq.filestudy.constant;


/**
 * 静态执行顺序 变量---》静态代码块
 */
public class Constats {

    /**
     * 获取项目根目录
     * 需要与utils.backup.ConstantUtils.CLIENT_ROOT 一致
     */
    public static String PROJECT_ROOT_DIRECTORY = "/data/news/client/";

    /**
     * 压缩文件位置
     */
    public static String ZIP_PATH = "/data/news/zip/";


    static {
        if (System.getProperty("os.name").toUpperCase().contains("WINDOWS")) {
            PROJECT_ROOT_DIRECTORY = "E:\\data\\client\\";
            ZIP_PATH = "E:\\data\\client\\ZIP\\";
        }
    }

    public interface FilePath{
       String UPLOAD_FILE_PATH = PROJECT_ROOT_DIRECTORY+ "upload/";

       String DOWNLOAD_FILE_PATH = PROJECT_ROOT_DIRECTORY+ "download/";

        /**
         * 上传文件路径
         * 时间戳/文件名
         */
        String UPLOAD_PATH = UPLOAD_FILE_PATH+"%s/%d/";



        /**
         * excel 下载存储路径
         * 下载后 excel临时存储的位置
         * 时间戳/文件名/
         *
         * 下载人name/下载userId
         */

        String DOWNLOAD_PATH = DOWNLOAD_FILE_PATH+"%s/%d/";
    }


}
